#include "plugins.h"
#include "PluginLoader.h"
#include <iostream>

int main() {

    std::string plug_file = "/Users/jiazhen/jazz/plugin_example/cmake-build-debug/plugins/libmy_plugins.dylib";
    jazz::PluginLoader plugin(plug_file);
    if (plugin.success()) {
        printf("Plugin was loaded.\n");
        auto func_add = plugin.getFunc<int, int, int>("plugin_add");
        int a = 3, b = 4;
        printf("Addition test by plugins: %d + %d = %d", a, b, func_add(a, b));
    }

    return 0;
}